Imports Microsoft.VisualBasic
Imports System.Data


<Serializable()> Public Class GenParameter
    Implements IDbDataParameter, IDataParameter

    Private parmName As String
    Private databType As DbType
    Private objValue As Object
    Private ColumnSource As String
    Private PSize As Integer
    Private ParamDirection As ParameterDirection
    Private IsitNullable As Boolean
    Private WhatPrecision As Byte
    Private WhatScale As Byte
    Private WhatSourceVersion As DataRowVersion

    Public Property DbType() As System.Data.DbType Implements System.Data.IDataParameter.DbType

        Get
            Return databType
        End Get

        Set(ByVal value As System.Data.DbType)
            databType = value
        End Set

    End Property

    Public Property Direction() As System.Data.ParameterDirection Implements System.Data.IDataParameter.Direction
        Get
            Return ParamDirection
        End Get
        Set(ByVal value As System.Data.ParameterDirection)
            ParamDirection = value
        End Set
    End Property

    Public ReadOnly Property IsNullable() As Boolean Implements System.Data.IDataParameter.IsNullable
        Get
            Return IsitNullable
        End Get
    End Property

    Public Property ParameterName() As String Implements System.Data.IDataParameter.ParameterName
        Get
            Return parmName
        End Get
        Set(ByVal value As String)
            parmName = value
        End Set
    End Property

    Public Property SourceColumn() As String Implements System.Data.IDataParameter.SourceColumn
        Get
            Return ColumnSource
        End Get
        Set(ByVal value As String)
            ColumnSource = value
        End Set
    End Property

    Public Property SourceVersion() As System.Data.DataRowVersion Implements System.Data.IDataParameter.SourceVersion
        Get
            Return WhatSourceVersion
        End Get
        Set(ByVal value As System.Data.DataRowVersion)
            WhatSourceVersion = value
        End Set
    End Property

    Public Property Value() As Object Implements System.Data.IDataParameter.Value
        Get
            Return objValue
        End Get
        Set(ByVal value As Object)
            objValue = value
        End Set
    End Property

    Public Property Precision() As Byte Implements System.Data.IDbDataParameter.Precision
        Get
            Return WhatPrecision
        End Get
        Set(ByVal value As Byte)
            WhatPrecision = value
        End Set
    End Property

    Public Property Scale() As Byte Implements System.Data.IDbDataParameter.Scale
        Get
            Return WhatScale
        End Get
        Set(ByVal value As Byte)
            WhatScale = value
        End Set
    End Property

    Public Property Size() As Integer Implements System.Data.IDbDataParameter.Size
        Get
            Return PSize
        End Get
        Set(ByVal value As Integer)
            PSize = value
        End Set
    End Property

    Public Sub New()

    End Sub

    Public Sub New(ByVal ParameterName As String, ByVal value As Object)
        parmName = ParameterName
        objValue = value
    End Sub

    Public Sub New(ByVal ParameterName As String, ByVal value As Object, ByVal ParamType As DbType)
        parmName = ParameterName
        objValue = value
        databType = ParamType
    End Sub

End Class
